<select style="margin: 0 10px;{{ formatting|default('')|raw }}"
        name="submission_version" onChange="{{ on_change|default('')|raw }}" id="submission-version-select">

    {% if active_version == 0 %}
        <option value="0" {{ display_version == active_version ? "selected" : "" }}></option>
    {% endif %}

    {% for version in versions %}
        <option value="{{ loop.index }}" {{ loop.index == display_version ? "selected" : "" }}>
            Version #{{ loop.index }}

            {%- if total_points > 0 -%}
                &nbsp;&nbsp;&nbsp;Score: {{ version.points }} / {{ total_points }}
            {%- endif -%}
            {%- if version.days_late > 0 -%}
                &nbsp;&nbsp;&nbsp;Days Late: {{ version.days_late }}
            {%- endif -%}
            {%- if loop.index == active_version -%}
                &nbsp;&nbsp;&nbsp;GRADE THIS VERSION
            {%- endif -%}
        </option>
    {% endfor %}
</select>
